//
//  BaseCell.h
//  Gunterapple
//
//  Created by 热带雨林 on 2020/3/18.
//  Copyright © 2020 热带雨林. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "openOrCloseModel.h"

NS_ASSUME_NONNULL_BEGIN
//cell的状态
typedef NS_ENUM(NSInteger){
    CLOSE = 0,
    OPEN = 1,
}BtnType;
@class BaseCell;
#pragma mark - 基类cell代理
@protocol BaseCellDelegate <NSObject>
/** 选中按钮点击*/
- (void)baseCell:(BaseCell *)baseCell withBtnType:(BtnType)btnType withIndex:(int)index withArray:(NSMutableArray *)array;

@end

@interface BaseCell : UITableViewCell
//声明代理
@property (nonatomic, weak) id<BaseCellDelegate>delegate;
//按钮状态
@property (nonatomic, assign) BtnType btnType;

/**
点击的是哪一个cell上的按钮
 */
@property (nonatomic, assign) int index;
/**
 记录每个cell上的按钮状态
 */
@property (nonatomic, strong) NSMutableArray *indexArr;

@property (nonatomic, strong) openOrCloseModel *model;

- (void)setView:(openOrCloseModel *)model;

@end

NS_ASSUME_NONNULL_END
